#include <iostream>

class Animal
{
public:
    int age{};
    void walk()
    {
        std::cout << "Animal Walk" << std::endl;
    }
};

// 继承的语法： class [子类] : [继承方式] 父类
class Dog : public Animal
{

};

int main()
{

    Dog dog;
    std::cout << dog.age << std::endl;
    dog.walk();

    return 0;
}